package com.star.flow.controller;

import ch.qos.logback.classic.Logger;
import com.star.annotation.FeignTarget;
import com.star.flow.service.UserService;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user")
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    private Logger logger = (Logger) LoggerFactory.getLogger(this.getClass());

    @RequestMapping(value = "/", produces = "application/json")
    public Object test() {
        return userService.selectAll();
    }

    @RequestMapping(value = "/all")
    @FeignTarget
    public Object userAll() {

        return userService.selectAll();
    }

}
